function  change_image(image_id,id,act_type)
{
	var value = 0;
	if($('#'+image_id).attr("src") == '/wondershare/images/yes.gif')
	{
		value = 0;
		$('#'+image_id).attr("src","/wondershare/images/no.gif"); 
	}else
	{
		value = 1;
		$('#'+image_id).attr("src","/wondershare/images/yes.gif");  
	}
	
	if(act_type == 'new_recommend' || act_type == 'new_important')
	{
		$.get("/wondershare/faq_new.php?action=process_ajax", { type: act_type,id: id,value:value,web_type:$("#web_type").val() },
		function(data){

			});
	}
}
function  check_info(id,check_span_id,td_check_id,length,type)
{
	value = ($('#'+check_span_id).html());
	value = value.replace(/"/g,'&quot;');
	$("#"+check_span_id).remove();
	$("#"+td_check_id).html('<input type="text" id="'+check_span_id+'"  value="'+value+'"   style="width:'+length+'px" />');
	$("#"+check_span_id).focus();
	$("#"+check_span_id).blur( function () 
	{ 						  
		var check_value = $('#'+check_span_id).val();	
		if(type == 'p_page_click' || type == 'sort'  || type=='ar_count')
		{
			check_value = parseInt(check_value);
		}	
		var str ="<span   id='"+check_span_id+"' >"+check_value+"</span>";
		$("#"+td_check_id).html("");
		$("#"+td_check_id).html(str);
		
		$("#"+check_span_id).mouseout( function () { check_css(check_span_id,0); }); 
		$("#"+check_span_id).mouseover( function () { check_css(check_span_id,1); }); 
		$("#"+check_span_id).click( function () { check_info(id,check_span_id,td_check_id,length,type); }); 
		if(type == 'new_sort')
		{
			$.get("/wondershare/faq_new.php?action=process_ajax", { type:type, id: id,value:check_value },
			function(data){});  
		}						
	});
}

function  check_css(element_id,type)
{
	if(type==1)
	{
		$("#"+element_id).css({  "background": "blue","color": "#ff0011"}); 
	}
	else
	{
		$("#"+element_id).css({ "background": "","color":""}); 
	}
}

